﻿$(document).ready(function(){
    $("a", ".boton-nuevo" ).button();
    $("input", ".boton" ).button();
});
function EnvioPost(urlPeticion,variables,onSucces){
    $.ajax({type: 'POST',url:urlPeticion,data:variables,success:onSucces,dataType: "json",contentType: "application/json; charset=utf-8"});
}

function SeleccionarValorCombo(idCombo,valorSeleccionar){
    var options=$("#"+idCombo+" option");
    $.each(options,function(i,option){
        if(option.value==valorSeleccionar){
            $(option).attr("selected","selected");
        }
    });
}

function ObtenerParametro( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

